# sum1=0
# for a in range(0,100):
#     sum1+=a
# print(sum1)
import math


# 变成函数
# 列表推导式
def sum_range(start,stop):
    sum1=0
    for a in range(start,stop):  #放入我们函数的形参
        sum1+=a
    return sum1   #print() --->函数打印  把print 变成return
#                  return  ----->调用者去打印

print(sum_range(1, 100))

def yuan_mianji(r):
    # return  3.14*(r**2)
    mianji= math.pi*r*r
    print(mianji)

